package be.sc.classicnetwork.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;

import org.hibernate.annotations.Filter;
import org.hibernate.validator.Email;
import org.hibernate.validator.NotEmpty;

/**
 * Entity for Contact.
 */
@Entity
@Filter(name = "published")
public class Contact extends AbstractEntity {

	private static final long serialVersionUID = 8669379290083127202L;

	private boolean published = true;

	private String firstName;

	@NotEmpty
	private String lastName;

	@Email
	@NotEmpty
	private String email;

	@Lob
	private String address;

	private String phone;

	private String mobile;

	private String fax;

	private String company;

	private String webSite;

	@Lob
	private String comment;

	@ManyToMany
	private List<Make> makes = new ArrayList<Make>();

	@ManyToMany
	private List<Site> sites = new ArrayList<Site>();

	/**
	 * addMake.
	 */
	public void addMake(Make make) {
		this.makes.add(make);
	}

	/**
	 * addSite.
	 */
	public void addSite(Site site) {
		this.sites.add(site);
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public List<Make> getMakes() {
		return makes;
	}

	public void setMakes(List<Make> makes) {
		this.makes = makes;
	}

	public List<Site> getSites() {
		return sites;
	}

	public void setSites(List<Site> noAlertForSites) {
		this.sites = noAlertForSites;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getWebSite() {
		return webSite;
	}

	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public boolean isPublished() {
		return published;
	}

	public void setPublished(boolean published) {
		this.published = published;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
}
